import cv2
from XEdu.hub import Workflow as wf
import numpy as np

body = wf(task='body26' )

video = cv2.VideoCapture('cxk.mp4')
out = cv2.VideoWriter('out.mp4', cv2.VideoWriter_fourcc(*'mp4v'), 30.0, (1920, 1080))
while True:
    ret,img = video.read()
    if ret:
        pose,pose_img = body.inference(data=img,img_type='cv2')
        out.write(pose_img)

        #cv2.namedWindow('cxk', cv2.WINDOW_NORMAL)
        #cv2.resizeWindow('cxk', width=800, height=600)
        #cv2.imshow('cxk',pose_img)
        #if cv2.waitKey(1) & 0xFF == 27:
            #break